/*
 *  This program is an unpublished work fully protected by the United
 *  States copyright laws and is considered a trade secret belonging
 *  to Turner Broadcasting Systems, Inc. To the extent that this work may be
 *  considered "published,"
 *  the following notice applies:
 *
 *      "Copyright 2007, Turner Broadcasting Systems, Inc."
 *
 *  Any unauthorized use, reproduction, distribution, display,
 *  modification, or disclosure of this program is strictly prohibited.
 *
 */

package com.inspectortime.webapp.inspector;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;

import com.inspectortime.domain.Inspector;
import com.inspectortime.repository.Factory;
import com.inspectortime.repository.Repository;

public class InspectorViewDelegate {

	private Factory factory;
	
	private Repository repository;
	
	
	public ModelAndView dummyMethod(HttpServletRequest request, HttpServletResponse response) {
		String id = request.getParameter("inspectorId");
		Inspector inspector = repository.loadInspector(id);
		ModelAndView mv = new ModelAndView("inspector/inspectorProfile");
		mv.addObject("inspector", inspector);
		return mv;
	}
	
	public void setFactory(Factory factory) {
		this.factory = factory;
	}
	
	public void setRepository(Repository repository) {
		this.repository = repository;
	}

	public Repository getRepository() {
		return repository;
	}    
}
